#!/bin/sh
STAGE_FILES=$(git diff --cached --name-only --diff-filter=ACM -- 'frontend/desktop/src/*.ts' 'frontend/desktop/src/*.tsx' 'frontend/desktop/src/*.scss')

if test ${#STAGE_FILES} -gt 0
then
	cd frontend/desktop
	echo 'Frontend formatting'
	npm run formatFrontend
else
	echo 'No need to format'
fi
exit 0